package edu.infomatik.tundra.model;

import java.util.Map;

import org.apache.tapestry5.OptionModel;

import edu.infomatik.tundra.logic.UStoryBean;
import edu.infomatik.tundra.logic.WorkKinds;

public class StoryIdOptionModel implements OptionModel {

	private UStoryBean story;

	public StoryIdOptionModel(UStoryBean story){
		this.story=story;
	}
	@Override
	public Map<String, String> getAttributes() {
		return null;
	}

	@Override
	public String getLabel() {
		return story.getId()+": "+story.getName();
	}

	@Override
	public Object getValue() {
		return story;
	}

	@Override
	public boolean isDisabled() {
		if (story.getKind()==WorkKinds.USTORY_VALUE)
			return false;
		return true;
	}
}
